import React from 'react';
import { Tabs } from 'antd-mobile';
import AsyncComponent from '../commons/asyncComponent';
import Personal from '../personal'

const Index = AsyncComponent(() => import(/* webpackChunkName: "Index" */ "../index"))
const Zhenliao = AsyncComponent(() => import(/* webpackChunkName: "Zhenliao" */ "../zhenliao"))
// const Personal = AsyncComponent(() => import(/* webpackChunkName: "Personal" */ "../personal"))

const tabs = [
  { title: '首页', sub: '1' },
  { title: '诊疗', sub: '2' },
  { title: '我', sub: '3' },
];

const RootView = ({match}) => (
    <Tabs tabs={tabs}
      initialPage={0}
      prerenderingSiblingsNumber = {0}
      tabBarPosition='bottom'
      // onChange={(tab, index) => { console.log('onChange', index, tab); }}
      // onTabClick={(tab, index) => { console.log('onTabClick', index, tab); }}
    >
      <Index />
      <Zhenliao />
      <Personal />
    </Tabs>
);

export default RootView
